﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="WinnerCMS.WebUI.Admin.Member.Manage" CodeBehind="Member.aspx.cs" %>

<!doctype html>
<html>
<head runat="server">
    <title>会员管理</title>
    <meta http-equiv="Pragma" content="No-cach" />
    <%: Styles.Render("~/Content/Bootstrap/css") %>
    <%: Scripts.Render("~/Scripts/AdminBase") %>
    <script>
        function OpenRoleList(userId) {
            $("#dialog-modal").dialog({
                height: 340,
                width: 540,
                title: "角色列表",
                modal: true
            });
            var urlC = $("#dialog-modal-url");
            urlC.attr("src", "RoleList.aspx?UserID=" + userId);
            urlC.width(500);
            urlC.height(300);
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>

                <BootStrap:Breadcrumb ID="brPath" runat="server"></BootStrap:Breadcrumb>
                <div style="width: 100%">
                    <asp:DropDownList ID="ddlSort" runat="server">
                        <asp:ListItem Value="UserName">用户名</asp:ListItem>
                        <asp:ListItem Value="PetName">昵称</asp:ListItem>
                        <asp:ListItem Value="QQ">QQ</asp:ListItem>
                        <asp:ListItem Value="eMail">电邮</asp:ListItem>
                    </asp:DropDownList>
                    <asp:TextBox ID="txtKeyWord" runat="server"></asp:TextBox>&nbsp;
       
    <BootStrap:Button ID="btnSearch" runat="server" Text="搜索" OnClick="btnSearch_Click" />
                </div>


                <asp:GridView ID="GV_List" runat="server" AutoGenerateColumns="False" DataKeyNames="ID" GridLines="None" CssClass="table table-bordered table-condensed table-hover">
                    <HeaderStyle CssClass="HeaderStyle" Font-Bold="True"></HeaderStyle>
                    <Columns>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                <input type="checkbox" name="chk_SelectAll" value="chk_SelectAll" onclick="javascript: SelectAll(this);" />
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:CheckBox ID="cbkSelectID" runat="server" />
                            </ItemTemplate>
                            <ItemStyle Width="30px" HorizontalAlign="Center" />
                        </asp:TemplateField>

                        <asp:HyperLinkField DataNavigateUrlFields="ID" DataNavigateUrlFormatString="Member_Edit.aspx?ID={0}"
                            HeaderText="用户名" DataTextField="UserName">

                            <ItemStyle HorizontalAlign="Center" />
                        </asp:HyperLinkField>
                        <asp:BoundField DataField="PetName" HeaderText="昵称">

                            <ItemStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="角色">
                            <ItemTemplate>
                                <asp:HyperLink ID="HyperLink1" runat="server"
                                    NavigateUrl='<%# Eval("ID", "javascript:OpenRoleList({0});") %>' Text="角色"></asp:HyperLink>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" Width="80px" />
                        </asp:TemplateField>

                        <asp:BoundField DataField="Coin" HeaderText="金币">
                            <ItemStyle Width="80px" />
                            <ItemStyle HorizontalAlign="Right" />
                        </asp:BoundField>

                        <asp:BoundField DataField="Point" HeaderText="点数">
                            <ItemStyle Width="80px" />
                            <ItemStyle HorizontalAlign="Right" />
                        </asp:BoundField>


                        <asp:TemplateField HeaderText="账号状态">
                            <HeaderStyle Width="80px" />
                            <ItemStyle HorizontalAlign="Center" />
                            <ItemTemplate>
                                <%# IDState(Eval("IsLocked")) %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="LastLoginIP" HeaderText="最后登录IP">
                            <HeaderStyle Width="100px" />
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:BoundField DataField="LastLoginTime" DataFormatString="{0:yy-MM-dd HH:mm:ss}"
                            HeaderText="最后登录" HtmlEncode="False">
                            <HeaderStyle Width="108px" />
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:BoundField>

                    </Columns>
                </asp:GridView>
                <div class="form-inline">
                    <asp:DropDownList ID="ddlBatchToDo" runat="server">
                        <asp:ListItem Selected="True" Value="0">--请选择--</asp:ListItem>
                        <asp:ListItem>批量删除</asp:ListItem>
                        <asp:ListItem>封号</asp:ListItem>
                        <asp:ListItem>激活</asp:ListItem>
                    </asp:DropDownList>
                    <asp:Button ID="btnOK" runat="server" Text="确定" OnClick="btnOK_Click" EnableViewState="False"
                        CssClass="btn btn-default" />
                    &nbsp;|&nbsp;
            <WinnerCMS:NumericTextBox ID="NtxtDays" runat="server" Width="33px">90</WinnerCMS:NumericTextBox>天没有登录用户
            <asp:Button ID="btnGuoQi" runat="server" OnClick="btnGuoQi_Click" Text="查找" EnableViewState="False"
                CssClass="btn btn-default" />&nbsp;|&nbsp;<asp:LinkButton ID="lblYanZheng" runat="server" OnClick="lblYanZheng_Click">等待验证的会员</asp:LinkButton>
                </div>


                <WinnerCMS:PageNavigation ID="PageNavigation1" runat="server" OnPageChanging="PageNavigation1_PageChanging"
                    PageSize="15" CustomInfoSectionWidth="250px">
                </WinnerCMS:PageNavigation>

            </ContentTemplate>
        </asp:UpdatePanel>
    </form>
    <div id="dialog-modal">
        <iframe id="dialog-modal-url" frameborder="0" scrolling="no"></iframe>
    </div>
</body>
</html>
